Skip to content

use Locale.ROOT for case-insensitive keyword normalisation - #2437

Merged
manticore-projects merged 1 commit into
JSQLParser:masterfrom
dxbjavid:locale-root-keyword-folding
Jul 30, 2026
Merged

use Locale.ROOT for case-insensitive keyword normalisation#2437
manticore-projects merged 1 commit into
JSQLParser:masterfrom
dxbjavid:locale-root-keyword-folding

Conversation

@dxbjavid

Copy link
Copy Markdown
Contributor

several parser helpers fold SQL keywords and identifiers to upper case with the no-argument toUpperCase(), which uses the JVM default locale. under a Turkish or Azeri locale a keyword containing the letter i (union, intersect, minus, time, timestamp, like and friends) folds to a dotted İ instead of ASCII I, so the following Enum.valueOf lookup throws IllegalArgumentException and a valid statement fails to parse, while deparsing emits the wrong casing. switching the conversions to Locale.ROOT keeps case folding of SQL text independent of the runtime locale.

Signed-off-by: dxbjavid <dxbjavid@gmail.com>
@manticore-projects

Copy link
Copy Markdown
Contributor

Looks good but I need to fix the build script first :-(

@dxbjavid

Copy link
Copy Markdown
Contributor Author

no rush at all. happy to rebase onto master once the build script is sorted, just give me a shout if you need anything changed on my side.

@manticore-projects
manticore-projects merged commit 82b7c26 into JSQLParser:master Jul 30, 2026
3 of 6 checks passed
@dxbjavid

Copy link
Copy Markdown
Contributor Author

Thank you for the merge. Appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants